package com.gxa.learning.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 项目签到映射实体
 *
 * @Author lirucong
 * @Date 15:15 2021/12/2
 */
@Table(name = "tb_sign_in")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ProjectSign implements Serializable {
    /**
     * 签到记录编号
     */
    @Column(name = "sign_in_id")
    private Long SignInId;

    /**
     * 培训项目编号
     */
    @Column(name = "project_id")
    private Long projectId;

    /**
     * 学员编号
     */
    @Column(name = "user_id")
    private Long userId;

    /**
     * 签到发起时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "time")
    private Date time;

    /**
     * 签到时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "sign_time")
    private Date signTime;

    /**
     * 签到状态
     */
    @Column(name = "sign_status")
    private Boolean status;

    /**
     * 本次签到秘钥（区分不同的签到）
     */
    @Column(name = "sign_key")
    private String signKey;
    /**
     * 课程编号
     */
    @Column(name = "course_id")
    private Integer courseId;

}
